|
Blogs
Toad World blogs are a mix of insightful how-tos from Quest
experts as well as their commentary on experiences with
new database technologies. Have some views of your own to
share? Post your comments! Note: Comments are restricted to registered Toad World users.
Do you have a topic that you'd like discussed? We'd love to hear from you. Send us your idea for a blog topic.
Apr
8
Written by:
QCTO Blog
Friday, April 08, 2011
Written by Finn Ellebaek Nielsen
Oracle has recently released Oracle Database 11g Release 2 Express Edition Beta. This is great news as rumors had it that Oracle would not release an 11g
XE. In my view, this is a very important move from Oracle -- and one
that, perhaps surprisingly, could have a big and positive impact on
testing in the Oracle world.
Developer-specific Oracle Instances for Development and Unit Testing
In case you are using Oracle 11g-specific features in your
applications you couldn't use Oracle 10g Express Edition for development
and unit testing. This is now possible, thanks to Oracle releasing
Oracle 11g Express Edition.
Why would you use Oracle XE for development and testing? For various
reasons described in the following, I recommend the best practice of
each Oracle developer having his/her own dedicated Oracle instance for
development and unit testing.
Collaboration
You may wonder why I suggest that each developer has their own
database. An Oracle database is all about collaboration, isn't it?
That's true, but this is not necessarily a good idea. Consider this
situation: Your application has a central PL/SQL package that most other
PL/SQL and SQL code depend on. Now you need to make a change to it,
which presents you with the following challenges:
- You cannot compile it if some code using the package is currently running in another session as it will be locked.
- You need to make sure that you implement the change correctly:
- If you get the syntax wrong you have just severely affected
all the dependent code such that it no longer compiles (if the package
specification has compilation errors) or runs (if the package body has
compilation errors).
- If you get the semantics wrong it will take you a while to
run your unit tests against it and find and fix the error. In the
meantime, all your fellow team members are ripping their hair out in
frustration because they think that they have a defect in the code
they're currently working on.
- Two developers need to make changes to different subprograms of
the package. This cannot be achieved in the same schema of the same
instance and if they need to share the Code Tester repository in the
same schema of the same instance, Code Tester Test Builder/Test Editor
locks the entire test definition when the first developer enters it,
blocking out the other developer.
- It can be difficult to control and cater for synonyms,
sequences, PL/SQL and views in automated testing as these are shared
database objects (instead of session-based). When you have your own
instance you can control them 100%. For instance, consider how much
easier it would be to write a unit tests through the usage of the
following:
- Resetting of a sequence such that you know which values are
going to be used for primary keys. This makes it easier to write code
that verifies outcome in table data.
- Mocking: When testing a particular program, mocks should be
in place of other programs that the Program Under Test is calling. This
is one method of tackling the dependency chain of all the programs as
you would need to establish the test data setup correctly for all the
programs involved in order for your test to succeed, which quickly
becomes very complex. Using mocking, mocks of all the other programs
called would automatically be put in place during the execution of the
unit test.
DBA Privileges
The following limitations may also slow your progress if you share
the database with others and DBAs are controlling the environment, not
giving you any DBA privileges. In fact, each developer should be the DBA
of their own development database because:
- You should be able to kill defunct/infinite loop processes.
- You should be able to watch progress of long running transactions and sessions (access to V$SESSION_LONGOPS and V$SESSION).
- You should be able to create schemas for test (eg for Code
Tester's repository and test code) and prototype (trying out new ideas)
purposes.
- Have easy access to alert log and trace files.
- The DBAs don't have time to maintain your database.
Oracle Database Personal Edition
Obviously if you cannot work under the limitations imposed by Oracle
Database Express Edition (eg lack of support for Java stored procedures)
you could still implement the best practice through the purchase of a
Personal Edition license, which is less than USD 500 for a perpetual
license.
Limitations
11g XE is based on 11.2.0.2.0 and has the usual limitations, such as:
- Can only be executed on a single CPU per desktop/server.
- Only using up to 1GB RAM.
- Only a single instance allowed per desktop/server.
- No support for Java stored procedures.
- 11GB database instance size (up from 4GB for Oracle 10g Express Edition).
Download
You can download 11g XE Beta from OTN here:
http://www.oracle.com/technetwork/database/express-edition/11gxe-beta-download-302519.html?msgid=3-3822972261
Feedback
Provide Oracle your feedback on 11g XE Beta in the OTN forum "Oracle Database 11g Express Edition Beta" here:
2 comment(s) so far...
Re: Oracle Database 11g Express Edition Beta Released
My experience with 11g XE is, it is browser based and comes with a
preloaded HR database. It also supports a SQL command prompt. In case
of SQL command prompt, it is not allowing me to login to other databases
(system, etc) expect the preloaded HR database.
Also, i'm not
sure how to connect to this db from PL/SQL. This is not a big problem,
because, XE comes with a SQL command window (browser based) that
supports programming (procedures, functions, packages, etc).
By Anonymous on
Saturday, April 16, 2011
|
Re: Oracle Database 11g Express Edition Beta Released
Hi
Not sure what you mean by "connect to this db from PL/SQL"? PL/SQL is a language, not a tool.
I suggest you have a look at the document Getting Started: download.oracle.com/docs/cd/E17781_01/admin.112/e18585/toc.htm
If you have any issues I suggest you ask in the dedicated discussion forum: forums.oracle.com/forums/forum.jspa?forumID=1378
Hope this helps.
Cheers
Finn
By QCTOblog on
Friday, April 29, 2011
|
|
|